< previous page page_533 next page >

Page 533
0533-01.jpg
Figure 24.6
Parent and child tables are a form of data normalization.
A lookup table is another way to store information to prevent data redundancy and to increase the accuracy of data entry functions. Typically, a lookup table is used to store valid data entries (for example, a state abbreviations table). When a person enters the state code in an application, the program looks in the abbreviations table to make sure that the code exists.
You also can use a lookup table in data normalization. If you have a large mailing list, many of the entries use the same city and state information. In this case, you can use a zip code table as a related table to store the city and state by zip code (remember that each zip code corresponds to a single city and state combination). Using the zip code table requires that the mailing list use only the zip code of the address, and not the city and state. During data entry, you can have the program check an entered zip code against the valid entries.
Rules for Organizing Tables
Although no absolute rules exist for defining what data goes into which tables, here are some general guidelines to follow for efficient database design:
Determine a topic for each table, and make sure that all data in the table relates to the topic.
If several of the records in a table have fields intentionally left blank, split the table into two similar tables. (Remember the example of the employee and member tables.)
If information is repeated in a number of records, move that information to another table and set up a relationship between the tables.
Repeated fields indicate the need for a child table. For example, if you have Item1, Item2, Item3, and so on in a table, move the items to a child table that relates back to the parent table.
Use lookup tables to reduce data volume and to increase the accuracy of data entry.
Do not store information in a table if it can be calculated from data in other tables.
note.gif As stated previously, the guidelines for defining tables are not hard-and-fast rules. Sometimes, deviating from the guidelines makes sense. square.gif

 
< previous page page_533 next page >